package btrace;

import static com.sun.btrace.BTraceUtils.printArray;

import com.sun.btrace.AnyType;
import com.sun.btrace.BTraceUtils;
import com.sun.btrace.annotations.BTrace;
import com.sun.btrace.annotations.Kind;
import com.sun.btrace.annotations.Location;
import com.sun.btrace.annotations.OnMethod;
import com.sun.btrace.annotations.Return;
import com.sun.btrace.annotations.Self;


@BTrace
public class SelfAndArgTest {
//	@OnMethod(clazz="+cn.remotejob.service.IJobService",method="getJob",location=@Location(Kind.RETURN))
//	public static void onDetail(@Self Object self,int id,@Return AnyType val){
//		BTraceUtils.println("self="+self+",id="+id+",val="+val);
//		BTraceUtils.println(); //must add println()，otherwise can not print the last record
//	}
	
	@OnMethod(clazz="com.vv.music.activity.bigshots.controller.BigShotsCtrl",method="/.*/",location=@Location(Kind.RETURN))
	public static void onDetail(@Self Object self,AnyType[] args,@Return AnyType val){
		printArray(args);
		BTraceUtils.println("val="+val);
		BTraceUtils.println(); //must add println()，otherwise can not print the last record
	}
	
}
